package com.lxj.user.mapper;

import com.lxj.utils.entity.Permission;
import com.lxj.utils.entity.User;
import com.lxj.utils.vo.UserRoleRelation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
@Component
public interface UserMapper {
    List<User> findAll(User user);

    int delete(Integer[] id);

    List<UserRoleRelation> findRole(Integer id);

    int addRole(UserRoleRelation urr);

    int deleteRole(UserRoleRelation urr);

    String findName(String username);

    void updateUserType(UserRoleRelation urr);

    int add(User user);

    List<Permission> getPermissionsByUserId(@Param("id") Integer id);
}
